package cn.org.book.shop.article.service.impl;

import cn.org.book.shop.article.domain.ApArticleConfig;
import cn.org.book.shop.article.mapper.ApArticleConfigMapper;
import cn.org.book.shop.article.service.IApArticleConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * APP已发布文章配置Service业务层处理
 *
 * @author julywhj
 * @date 2020-11-17
 */
@Service
public class ApArticleConfigServiceImpl implements IApArticleConfigService {
    @Autowired
    private ApArticleConfigMapper apArticleConfigMapper;

    /**
     * 查询APP已发布文章配置
     *
     * @param id APP已发布文章配置ID
     * @return APP已发布文章配置
     */
    @Override
    public ApArticleConfig selectApArticleConfigById(Long id) {
        return apArticleConfigMapper.selectApArticleConfigById(id);
    }

    /**
     * 查询APP已发布文章配置列表
     *
     * @param apArticleConfig APP已发布文章配置
     * @return APP已发布文章配置
     */
    @Override
    public List<ApArticleConfig> selectApArticleConfigList(ApArticleConfig apArticleConfig) {
        return apArticleConfigMapper.selectApArticleConfigList(apArticleConfig);
    }

    /**
     * 新增APP已发布文章配置
     *
     * @param apArticleConfig APP已发布文章配置
     * @return 结果
     */
    @Override
    public int insertApArticleConfig(ApArticleConfig apArticleConfig) {
        return apArticleConfigMapper.insertApArticleConfig(apArticleConfig);
    }

    /**
     * 修改APP已发布文章配置
     *
     * @param apArticleConfig APP已发布文章配置
     * @return 结果
     */
    @Override
    public int updateApArticleConfig(ApArticleConfig apArticleConfig) {
        return apArticleConfigMapper.updateApArticleConfig(apArticleConfig);
    }

    /**
     * 批量删除APP已发布文章配置
     *
     * @param ids 需要删除的APP已发布文章配置ID
     * @return 结果
     */
    @Override
    public int deleteApArticleConfigByIds(Long[] ids) {
        return apArticleConfigMapper.deleteApArticleConfigByIds(ids);
    }

    /**
     * 删除APP已发布文章配置信息
     *
     * @param id APP已发布文章配置ID
     * @return 结果
     */
    @Override
    public int deleteApArticleConfigById(Long id) {
        return apArticleConfigMapper.deleteApArticleConfigById(id);
    }
}
